﻿#pragma once
#include <atomic>
#include <mutex>

class Monitor
{
public:
	Monitor() = default;
	virtual ~Monitor() = default;

	Monitor* monitor() { return this; }
	bool IsStart() { return isRun_; }
	bool IsStop() { return !isRun_; }
	bool IsReadyStop() { return isReadyStop_; }
protected:
	virtual void start() {};
	virtual void stop() {};

public:
	std::atomic_bool isRun_ = false;
	std::atomic_bool isReadyStop_ = false;
};
